package pl.edu.agh.mbc.database.dao;

import java.io.Serializable;

import org.springframework.dao.support.DataAccessUtils;
import pl.edu.agh.dao.interfaces.IUserDao;
import pl.edu.agh.mbc.database.dao.commons.BaseDao;
import pl.edu.agh.mbc.persistance.User;

public class UserDaoImpl extends  BaseDao<Serializable> implements IUserDao {

	public User login(String login, String password) {
		return (User) DataAccessUtils.uniqueResult(hibernateTemplate.find("from pl.edu.agh.mbc.persistance.User where login=? and password=?", new Object[]{login, password}));
	}
}
